<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@page import="com.huang.core.FetchWebContent"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	FetchWebContent fwc = new FetchWebContent();
%>
<html>
	<head>
		<script type="text/javascript">
	function createXmlHttpRequest() { //创建XmlHttpRequest的方法
		if (window.ActiveXObject) { //IE浏览器
			return new ActiveXObject("Microsoft.XMLHTTP");
		} else if (window.XMLHttpRequest) { //其他支持ajax的浏览器
			return new XMLHttpRequest();
		}
	}

	var xmlHttp;
	function ajaxLogin() 
	{ //Ajax登陆请求方法
		xmlHttp = createXmlHttpRequest();
		var url = "http://pc-20110726mwke:8080/menu//servlet/MenuServlet"; //请求
		xmlHttp.onreadystatechange = loginResult;//xmlHttp回调方法
		xmlHttp.open("POST", url, true); //POST方法递交
		xmlHttp.setRequestHeader("Content-Type",
				"application/x-www-form-urlencoded");
		var loginmsg = "name=hello,world";
		xmlHttp.send(loginmsg); //传递参数
	}

	function loginResult() 
	{
		//alert(xmlHttp.responseText);
		if (xmlHttp.responseText != ""&&xmlHttp.status==200&&xmlHttp.readyState==4) 
		{
			var postbackText = xmlHttp.responseText; //接受LoginAction回发的responseText
			document.getElementById("content").innerHTML = postbackText;
		}
		else
		{
			//frameA.innerText = "error";
		}

	}
</script>
		<base href="<%=basePath%>">

		<title>My JSP 'index.jsp' starting page</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	</head>

	<body>


		<input type="text" name="text1" size="215">
		<button onclick=
	ajaxLogin();
>
			跳转
		</button>
		<table id="content">
		
		</table>
	</body>
</html>